﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyWPF.Models.TCP.TCPClient
{
    public interface ITCPClient
    {
        /// <summary>
        /// 打开连接
        /// </summary>
        /// <param name="ClientContext"></param>
        void Connect(TCPClientContext ClientContext);

        /// <summary>
        /// 写入数据
        /// </summary>
        /// <param name="Message"></param>
        void Write(string Message);
    }

    public class TCPClientContext
    {
        /// <summary>
        /// 服务端的IP
        /// </summary>
        public string IP { get; set; }

        /// <summary>
        /// 服务端的端口
        /// </summary>
        public int Port { get; set; }

        /// <summary>
        /// 自动重新连接
        /// </summary>
        public bool AutoLink { get; set; }
    }
}
